﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Repositories;

namespace AsiaSnackExpress
{
    public partial class mainadmin : System.Web.UI.MasterPage
    {
        public bool IsLogin
        {
            get
            {

                if (Session["userName"] != null)
                    return true;
                return false;
            }
        }
        protected override void OnLoad(EventArgs e)
        {

            DIHelper.Configure();
            base.OnLoad(e);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsLogin)
                Response.Redirect("Login.aspx");
        }
    }
}